package com.soyoung.controller;
    
/*
  Created by IntelliJ IDEA.
  User: zhuhongqiang
  Create: 2018/6/29 10:46
 */

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("hello")
public class InfoController {
    /**
     * 欢迎页面
     * @return
     */
    @RequestMapping("/info")
    public String showInfo(Model model) throws  Exception{
        model.addAttribute("hello","hello body");
        return "info";
    }
     @RequestMapping("zhu")
    public String hello(Model model) throws  Exception{
        model.addAttribute("hello","hello body");
        return "hello";
    }

    @RequestMapping("/info1")
    @ResponseBody
    public String showInfo1(Model model) throws  Exception{
        return "/templates/index";
    }
}
